package demo;

import listener.DoorListener1;
import listener.DoorListener2;
import manager.DoorManager;

/**
 * @classDesc: 功能描述:()
 * @author: 黄伟成
 * @createTime: 2017/9/21 14:48
 * @version: v1.0
 * @copyright:善林(上海)金融信息服务有限公司
 */
public class DoorDemo {

    public static void main(String[] args) {
        DoorManager manager = new DoorManager();
        manager.addDoorListener(new DoorListener1());
        manager.addDoorListener(new DoorListener2());

        // 开门
        manager.fireWorkspaceOpened();
        System.out.println("我已经进来了");
        // 关门
        manager.fireWorkspaceClosed();
    }
}
